<template>
  <div id="app">
    <ul>
      <li v-for="(str, idx) in myArr" :key="idx">{{ str }}</li>
    </ul>
    <button @click="change">走一走</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      myArr: ["帅哥", "美女", "程序猿"],
    }
  },
  methods: {
    change() {
      // 头部删除
      const item = this.myArr.shift()
      // 尾部添加
      this.myArr.push(item)
    }
  }
}
</script>